<?php

namespace app\validate\system;

use think\Validate;

class SystemRegionValidate extends Validate
{
    protected $rule = [
        'name|地区名称' => 'require',
        'pid|父级归属' => 'require|number',
    ];

    public function sceneAdd()
    {
        return $this->remove('id', 'require');
    }

    public function sceneEdit()
    {
        return $this->remove('id', 'require');
    }

    public function sceneDel()
    {
        return $this->only(['ids'])->append('ids', 'require|array');
    }


}